Secure joining information generation system, secure joining system, methods therefor, secure computing apparatus and program

ABSTRACT

A secure joining system is a secure joining system including a plurality of secure computing apparatuses. The plurality of secure computing apparatuses include a vector joining unit  11   n , a first vector generation unit  12   n , a first permutation calculation unit  13   n , a first permutation application unit  14   n , a second vector generation unit  15   n , a third vector generation unit  16   n , a second permutation calculation unit  17   n , a second permutation application unit  18   n , a fourth vector generation unit  19   n , a fifth vector generation unit  110   n , a first inverse permutation application unit  111   n , a first vector separation unit  112   n , a second inverse permutation application unit  113   n  and a second vector separation unit  114   n , a third permutation application unit  115   n , a fourth permutation application unit  116   n , and a first joined table generation unit  117   n .

TECHNICAL FIELD

The present invention relates to secure computation techniques. In particular, it relates to techniques for joining two tables while maintaining confidentiality.

BACKGROUND ART

In the field of secure computation techniques, there is a demand for a technique for joining two tables while maintaining confidentiality.

For example, a technique described in Non-patent Literature 1 is known as a technique for joining two tables while maintaining confidentiality. Non-patent Literature 1 has realized equi-join in a case with key overlap.

PRIOR ART LITERATURE Non-Patent Literature

Non-Patent Literature 1: Naoto Kiribuchi, Dai Ikarashi, Gembu Morohashi, and Koki Hamada, “An Efficient Equi-Join Algorithm for Secure Computation and Its Implementation Toward Secure Comprehensive Analyses of Users' Attribute and History Information”,

SUMMARY OF THE INVENTION Problems to be Solved by the Invention

The present invention provides a secure joining information generation system, a secure joining system, methods therefor, a secure computing apparatus, and a program for generating information necessary to join two tables while maintaining confidentiality in a case with no key overlap more rapidly than the technique of Non-patent Literature 1.

Means to Solve the Problems

A secure joining information generation system according to an aspect of the present invention is a secure joining information generation system including a plurality of secure computing apparatuses, where F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; V₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively. The plurality of secure computing apparatuses include: a plurality of vector joining units that use a share [k₀] of the vector k₀ and a share [k₁] of the vector k₁ to generate a share [k] of a vector k ∈ [F_(k)]^(m0+m1) which is generated by joining the vector k₀ and the vector k₁; a plurality of first vector generation units that generate a share [f] of a vector f which is generated by joining m₀ 0's and m₁ 1's; a plurality of first permutation calculation units that use the share [k] to generate a share [σ] of a permutation σ for stable sorting of the vector k; a plurality of first permutation application units that use the share [k], the share [σ], and the share [f] to generate a share [σ(k)] of a vector σ(k) which is generated by application of the permutation σ to the vector k and a share [σ(f)] of a vector σ(f) which is generated by application of the permutation σ to the vector f; a plurality of second vector generation units that use the share [σ(k)] to generate a share [e] of a vector e which has 1 when a certain element of the vector σ(k) and an element following that element are the same and has 0 when they are different as an element corresponding to that element; a plurality of third vector generation units that use the share [e] to generate a share [e′] of a vector e′, which is generated by bit inversion of each element of a vector which has 1 when one of a certain element of the vector e and an element preceding that element is 1 and has 0 otherwise as an element corresponding to that element; a plurality of second permutation calculation units that use the share [e′] to generate a share [σ′] of a permutation σ′ for stable sorting of the vector e′; a plurality of second permutation application units that use the share [σ(f)] and the share [σ′] to generate a share [f′] of a vector f′=σ′(σ(f)) which is generated by application of the permutation σ′ to the vector σ(f); a plurality of fourth vector generation units that use the share [f′] to generate a share [s] of a vector s, each element of which is a sum of elements of the vector f′ up to an element corresponding to that element, the elements including the element corresponding to that element, and a share [s′] of a vector s′, each element of which is a sum of elements of a bit-inverted vector up to an element corresponding to that element, the elements including the element corresponding to that element, where the bit-inverted vector is a vector generated by bit inversion of each element of the vector f′; a plurality of fifth vector generation units that use the share [f′], the share [s], and the share [s′] to calculate a share [σ″] of a vector σ″=f′s+(1−f′)s′−1; a plurality of first inverse permutation application units that use the share [e′] and the share [σ] to generate a share [e″] of a vector e″=σ⁻¹(e′) which is generated by application of an inverse permutation σ⁻¹ of the permutation σ to the vector e′; a plurality of first vector separation units that use the share [e″] to generate a share [g₀] of a vector g₀ which is formed from first m₀ elements of the vector e″ and a share [g₁] of a vector g₁ which is formed from remaining m₁ elements of the vector e″; a plurality of second inverse permutation application units that use the share [σ″], the share [σ], and the share [σ′] to generate a share [σ′″⁻¹] of a vector σ′″⁻¹=σ⁻¹(σ′⁻¹(σ″)) which is generated by application of an inverse permutation σ′⁻¹ of the permutation σ′ and the inverse permutation σ⁻¹ of the permutation σ to the vector x; a plurality of second vector separation units that use the share [σ′″⁻¹] to generate a share [σ₀ ⁻¹] of a vector σ₀ ⁻¹ which is formed from first m₀ elements of the vector σ′″⁻¹ and a share [σ₁ ⁻¹] of a vector σ₁ ⁻¹ which is formed from remaining m₁ elements of the vector σ′″⁻¹; and a plurality of third permutation application units that use the share [σ₀ ⁻¹], the share [σ₁ ⁻¹], a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to the vector σ₀ ⁻¹ and a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to the vector σ₁ ⁻¹, and release the π₀(σ₀ ⁻¹) and the π₁(σ₁ ⁻¹).

A secure joining system according to an aspect of the present invention includes the plurality of secure computing apparatuses of the secure joining information generation system described above. The plurality of secure computing apparatuses further include: a plurality of fourth permutation application units that use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and a share [v₁] of the vector v₁ to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁′] of a vector k₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁′] of a vector v₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)); and a plurality of first joined table generation units that use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a vector generated by extracting first c elements of the vector k₀′, a vector generated by extracting first c elements of the vector v₀′, a vector generated by extracting first c elements of the vector k₁′, and a vector generated by extracting first c elements of the vector v₁′, where c is the number of 0 elements in the vector g₀ or the vector g₁.

A secure joining system according to an aspect of the present invention is a secure joining system including a plurality of secure computing apparatuses, where F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively. The plurality of secure computing apparatuses include: a plurality of secure joining information generation units that use a share [k₀] of the vector k₀, a share [k₁] of the vector k₁, a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to an inverse permutation σ₀ ⁻¹ of a permutation σ₀, where permutation of each vector of the first table with the permutation σ₀ causes records for keys common to the first table and the second table to move to a head side, a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to an inverse permutation σ₁ ⁻¹ of a permutation σ₁, where permutation of each vector of the second table with the permutation σ₁ causes records for keys common to the first table and the second table to move to the head side, a share [g₀] of a vector g₀ which is formed from a value g_(0,i) indicating whether the ith record of the first table is a record for a key that is common to the first table and the second table, and a share [g₁] of a vector g₁ which is formed from a value g_(1,i) indicating whether the ith record of the second table is a record for a key that is common to the first table and the second table; a plurality of filtering units that use the share [g₁], the share [k₁] of the vector k₁, and the share [v₁] of the vector v₁ to generate a modified second table in which if g_(1,i)=1, the ith element of the key of the second table is set to a predefined value u_(1,k) indicating null and the ith element of the attribute of the second table is set to a predefined value u_(1,v) indicating null, where g_(1,i) is the ith element of the vector g₁; a plurality of fifth permutation application units that use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, a share [k₁′] of k₁′, which is a vector of the key of the modified second table, a share [v₁′] of v₁′, which is a vector of the attribute value of the modified second table, the share [π₀] of the permutation π₀, the share [π₁] of the permutation π₁, the share [π₀(σ₀ ⁻¹)], and the share [π₁(σ₁ ⁻¹)] to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁″] of a vector k₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁″] of a vector v₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)); and a plurality of second joined table generation units that use the share [k₀′], the share [v₀′], the share [k₁″], and the share [v₁″] to generate, when m₀<m₁, a joined table which joins the vector k₀′, the vector v₀′, a vector generated by extracting first m₀ elements of the vector k₁″, and a vector generated by extracting first m₀ elements of the vector v₁″, and to generate, when m₀>m₁, a joined table which joins the vector k₀′, the vector v₀′, a vector generated by adding m₀-m₁ elements being a predefined value u_(k) indicating null to the vector k₁′, and a vector generated by adding m₀-m₁ elements being a predefined value u_(v) indicating null to the vector v₁″.

A secure joining system according to an aspect of the present invention is a secure joining system including a plurality of secure computing apparatuses, where F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively. The plurality of secure computing apparatuses include: a plurality of secure joining information generation units that use a share [k₀] of the vector k₀, a share [k₁] of the vector k₁, a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to an inverse permutation σ₀ ⁻¹ of a permutation σ₀, where permutation of each vector of the first table with the permutation σ₀ causes records for keys common to the first table and the second table to move to a head side, a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to an inverse permutation σ₁ ⁻¹ of a permutation σ₁, where permutation of each vector of the second table with the permutation σ₁ causes records for keys common to the first table and the second table to move to the head side, a share [g₀] of a vector g₀ which is formed from a value g_(0,i) indicating whether the ith record of the first table is a record for a key that is common to the first table and the second table, and a share [g₁] of a vector g₁ which is formed from a value g_(1,i) indicating whether the ith record of the second table is a record for a key that is common to the first table and the second table; a plurality of fourth permutation application units that use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and a share [v₁] of the vector v₁ to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁′] of a vector k₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁′] of a vector v₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)); and a plurality of third joined table generation units that use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a table (1) which joins a vector generated by extracting first c elements of the vector k₀′, a vector generated by extracting first c elements of the vector v₀′, a vector generated by extracting first c elements of the vector k₁′, and a vector generated by extracting first c elements of the vector v₁′, a table (2) which joins a vector generated by extracting remaining m₀-c elements of the vector k₀′, a vector generated by extracting remaining m₀-c elements of the vector v₀′, and a vector having a value corresponding to the attribute value of the second table set to a predefined value u′_(1,v) indicating null, and a table (3) which joins a vector generated by extracting remaining m₀-c elements of the vector v₀′, a vector generated by extracting remaining m₁-c elements of the vector v₁′, and a vector having a value corresponding to the attribute value of the first table set to a predefined value u′_(0,v) indicating null, where c is the number of 0 elements in the vector g₀ or the vector g₁.

Effects of the Invention

Use of inverse permutation makes it possible to generate information necessary to join two tables while maintaining confidentiality in a case with no key overlap more rapidly than the technique of Non-patent Literature 1. In turn, using the information, two tables can be joined while maintaining confidentiality in a case with no key overlap more rapidly than the technique of Non-patent Literature 1.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a functional configuration of a secure joining system.

FIG. 2 illustrates a functional configuration of a secure computing apparatus of a secure joining system for performing inner join.

FIG. 3 illustrates a processing procedure of a secure joining method for performing inner join, a secure joining method for performing left outer join, and a secure joining method performing full outer join.

FIG. 4 illustrates a processing procedure of a secure joining method for performing inner join and a secure joining method for performing full outer join.

FIG. 5 illustrates a processing procedure of a secure joining method for performing left outer join.

FIG. 6 illustrates a functional configuration of a secure computing apparatus of a secure joining system for performing left outer join.

FIG. 7 illustrates a functional configuration of a secure computing apparatus of a secure joining system for performing full part join.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Embodiments of the present invention are described below in detail. In the drawings, components having the same function are given the same reference characters and overlapping description is omitted.

Secure Joining System for Performing Inner Join

Referring to FIG. 1, an exemplary configuration of a secure joining system according to an embodiment is described. This secure joining system and method performs so-called inner join. That is, this secure joining system joins records that are common to a first table and a second table while maintaining confidentiality.

The secure joining system includes N (≥2) secure computing apparatuses 1 ₁, . . . , 1 _(N). In this embodiment, the secure computing apparatuses 1 ₁, . . . , 1 _(N) are each connected to a communication network 2. The communication network 2 is a circuit-switched or packet-switched communication network configured to allow communications between connected apparatuses, and can be the Internet, a local area network (LAN), a wide area network (WAN), and the like, for example. The apparatuses do not necessarily be capable of communicating online via the communication network 2. For example, they may be configured such that information entered to the secure computing apparatuses 1 ₁, . . ., 1 _(N) is stored in a portable recording medium such as magnetic tape or a USB memory and the information is entered offline to the secure computing apparatuses 1 ₁, . . . , 1 _(N) from the portable recording medium.

Referring to FIG. 2, an exemplary configuration of a secure computing apparatus 1 _(n) (n=1, . . . , N) included in the secure joining system is described. As shown in FIG. 2, the secure computing apparatus 1 _(n) of the secure joining system includes a vector joining unit 11 _(n), a first vector generation unit 12 _(n), a first permutation calculation unit 13 _(n), a first permutation application unit 14 _(n), a second vector generation unit 15 _(n), a third vector generation unit 16 _(n), a second permutation calculation unit 17 _(n), a second permutation application unit 18 _(n), a fourth vector generation unit 19 _(n), a fifth vector generation unit 110 _(n), a first inverse permutation application unit 111 _(n), a first vector separation unit 112 _(n) a second inverse permutation application unit 113 _(n) and a second vector separation unit 114 _(n), a third permutation application unit 115 _(n), a fourth permutation application unit 116 _(n), and a first joined table generation unit 117 _(n), for example.

By the components of the secure computing apparatus 1 _(n) (1≤n≤N) performing processing at each step described later in cooperation with the components of other secure computing apparatus 1 _(n′) (n′=1, . . . , N; where n≠n′), the secure joining method according to the embodiment is implemented.

The processing at each step is performed in secure computation. That is, the secure computing apparatus 1 _(n) performs the processing at each step without reconstructing a share, in other words, without knowing the content of the share.

The secure computing apparatus 1 _(n) is a special apparatus configured by loading of a special program into a well-known or dedicated computer having a central processing unit (CPU), main storage unit (random access memory: RAM), and the like, for example. The secure computing apparatus 1 _(n) executes various kinds of processing under control of the central processing unit, for example. Data input to the secure computing apparatus 1 _(n) and data resulting from processing are stored in the main storage unit, for example, and the data stored in the main storage unit is read into the central processing unit as necessary to be used for other processing. The components of the secure computing apparatus 1 _(n) may at least partially consist of hardware such as an integrated circuit.

For the following description, [α] is assumed to be a share generated by secret sharing of α, with α being an arbitrary vector or an arbitrary permutation.

Referring to FIGS. 3 and 4, the processing procedure of the secure joining method which is performed by the secure joining system in the embodiment is described.

For the following description, assume that m₀, m₁, L₀, and L₁ are integers greater than or equal to 1. m₀, m₁, L₀, and L₁ may be the same value or different values.

The first table has m₀ records. Each one of the m₀ records has one key and attribute values of L₀ attributes. Let k₀ ∈ F_(k) ^(m0) be a vector of the keys of the first table. Let v₀ ∈ F_(v) ^(m0) be a vector of the attribute values of each attribute of the first table. It is assumed that there are no overlapping keys in the first table. In a case where the first table contains the attribute values of multiple attributes, v₀ may be a vector which is a concatenation of the attribute values of the multiple attributes. For example, assume that the first table has two records and contains the attribute values of two attributes, where the vector of the attribute values of the first attribute is v_(0,1)=(29, 169) and the vector of the attribute values of the second attribute is v_(0,1)=(35, 175). In this case, v₀ may be the vector v₀=((29, 35), (169, 175)), which is a concatenation of the attribute values of these two attributes.

“m0” in the superscript to [F_(k), F_(v)]^(m0) means “m₀”. In this manner, representation of a further superscript or subscript can be omitted in a superscript. Similarly, representation of a further superscript or subscript can be omitted in a subscript.

The second table has m₁ records. Each one of the m₁ records has one key and attribute values of L₁ attributes. Let k₁ ∈ F_(k) ^(m1) be a vector of the keys of the second table. Let v₁ ∈ F_(v) ^(m1) be a vector of the attribute values of each attribute of the second table. It is assumed that there are no overlapping keys in the second table. In a case where the second table contains the attribute values of multiple attributes, v₁ may be a vector which is a concatenation of the attribute values of the multiple attributes like v₀.

Since in general a vector with its elements being rings is also a ring, data formed by arranging the values of the respective attributes contained in a record can be considered to be a vector, that is, a ring.

For example, assume that the first table has three records and consists of a vector of keys, k₀=(1, 2, 3), and a vector of the attribute values of one attribute, v₀=(5, 10, 1).

Also assume that the second table has four records and consists of a vector of keys, k₁=(1, 3, 4, 5), and a vector of the attribute values of one attribute, v₁=(2, 4, 9, 8).

Step S1

A share [k₀] of the vector k₀ and a share [k₁] of the vector k₁ are input to the vector joining units 11 ₁, . . . , 11 _(N).

The vector joining units 11 ₁, . . . , 11 _(N) each join [k₀] and [k₁] to obtain [k] ∈ [F_(k)]^(m0+m1).

More specifically, the vector joining units 11 ₁, . . . , 11 _(N) each use the share [k₀] of the vector k₀ and the share [k₁] of the vector k₁ to generate a share [k] of a vector k ∈ [F_(k)]^(m0+m1) which is generated by joining the vector k₀ and the vector k₁ (step S1).

The generated share [k] is output to the first permutation calculation units 13 ₁, . . . , 13 _(N) and the first permutation application units 14 ₁, . . . , 14 _(N).

For example, assume that the vector k₀=(1, 2, 3) and the vector k₁=(1, 3, 4, 5) hold. In this case, the vector k=(1, 2, 3, 1, 3, 4, 5) is yielded.

Step S2

The first vector generation units 12 ₁, . . . , 12 _(N) each generate a share [f] of a vector f which is generated by joining m₀ 0's and m₁ 1's (step S2).

The share [f] is output to the first permutation application units 14 ₁, . . . , 14 _(N).

For example, the vector f=(0, 0, 0, 1, 1, 1, 1) is yielded when m₀=3 and m₁=4.

Step S3

The share [k] is input to the first permutation calculation units 13 ₁, . . . , 13 _(N).

The first permutation calculation units 13 ₁, . . . , 13 _(N) each use the share [k] to generate a share [σ] of a permutation σ for stable sorting of the vector k (step S3).

The share [σ] is output to the first permutation application units 14 ₁, . . . , 14 _(N) and the second inverse permutation application units 113 ₁, . . . , 113 _(N).

For example, when k=(1, 2, 3, 1, 3, 4, 5), the permutation a will be as shown in Formula (1) below. For example, assuming that numbers are denoted starting at 1, each sequence (i,j)^(T) of the permutation σ means that the ith element of the vector to which the permutation is applied is moved to the jth element.

$\begin{matrix} {\sigma = \begin{pmatrix} 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ 1 & 3 & 4 & 2 & 5 & 6 & 7 \end{pmatrix}} & (1) \end{matrix}$

Stable sort refers to sorting in which the order of equal data before sorting is preserved after the sorting. Generation of the share [σ] of the permutation σ for performing a stable sort can be implemented with the approach of Reference Literature 1, for example.

[Reference Literature 1] Dai Ikarashi, Koki Hamada, Ryo Kikuchi, and Koji Chida, “A Design and an Implementation of Super-high-speed Multi-party Sorting: The Day When Multi-party Computation Reaches Scripting Languages”, CSS2017, 2017

Step S4

The share [k], the share [σ], and the share [f] are input to the first permutation application units 14 ₁, . . . , 14 _(N).

The first permutation application units 14 ₁, . . . , 14 _(N) each use the share [k], the share [σ], and the share [f] to generate a share [σ(k)] of a vector σ(k) which is generated by application of the permutation σ to the vector k and a share [σ(f)] of a vector σ(f) which is generated by application of the permutation σ to the vector f (step S4).

The share [σ(k)] is output to the second vector generation units 15 ₁, . . . , 15 _(N).

The share [σ(f)] is output to the second permutation application units 18 _(k), . . . , 18 _(N).

For example, the vector σ(k)=(1, 1, 2, 3, 3, 4, 5) and the vector σ(f)=(0, 1, 0, 0, 1, 1, 1) are yielded when the vector k=(1, 2, 3, 1, 3, 4, 5) and the vector f=(0, 0, 0, 1, 1, 1, 1) hold and the permutation σ is the permutation defined by the Formula (1) above.

Step S5

The share [σ(k)] is input to the second vector generation units 15 ₁, . . . , 15 _(N).

The second vector generation units 15 ₁, . . . , 15 _(N) each use the share [σ(k)] to generate a share [e] of a vector e which has 1 when a certain element of the vector σ(k) and the element following that element are the same and has 0 when they are different as the element corresponding to that element (step S5). Here, assume that e_(n−1)=0 holds.

The share [e] is output to the third vector generation units 16 ₁, . . . , 16 _(N).

For example, the vector e=(1, 0, 0, 1, 0, 0, 0) is yielded when the vector σ(k)=(1, 1, 2, 3, 3, 4, 5).

Step S6

The share [e] is input to the third vector generation units 16 ₁, . . . , 16 _(N).

The third vector generation units 16 ₁, . . . , 16 _(N) each use the share [e] to generate a share [e′] of a vector e′, which is generated by bit inversion of each element of a vector which has 1 when one of a certain element of the vector e and the element preceding that element is 1 and has 0 otherwise as the element corresponding to that element (step S6).

The share [e′] is output to the second permutation calculation units 17 ₁, . . . , 17 _(N).

For example, the vector e′=(0, 0, 1, 0, 0, 1, 1) is yielded when the vector e=(1, 0, 0, 1, 0, 0, 0).

Step S7

The share [e′] is input to the second permutation calculation units 17 ₁, . . . , 17 _(N).

The second permutation calculation units 17 ₁, . . . , 17 _(N) each use the share [e′] to generate a share [σ′] of a permutation σ′ for stable sorting of the vector e′ (step S7).

The share [σ′] is output to the second permutation application units 18 ₁, . . . , 18 _(N) and the second inverse permutation application units 113 ₁, . . . , 113 _(N).

For example, the permutation σ′ will be as shown in Formula (2) below when the vector e′=(0, 0, 1, 0, 0, 1, 1).

$\begin{matrix} {\sigma^{\prime} = \begin{pmatrix} 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ 1 & 2 & 5 & 3 & 4 & 6 & 7 \end{pmatrix}} & (2) \end{matrix}$

Step S8

The share [σ(f)] and the share [σ′] are input to the second permutation application units 18 ₁, . . . , 18 _(N).

The second permutation application units 18 ₁, . . . , 18 _(N) each use the share [σ(f)] and the share [σ′] to generate a share [f′] of a vector f′=σ′(σ(f)) which is generated by application of the permutation σ′ to the vector σ(f) (step S8).

The share [f′] is output to the fourth vector generation units 19 ₁, . . . , 19 _(N).

For example, the vector f′=(0, 1, 0, 1, 0, 1, 1) is yielded when the vector σ(f)=(0, 1, 0, 0, 1, 1, 1) holds and the permutation σ′ is the permutation defined by the Formula (2) above.

Step S9

The share [f′] is input to the fourth vector generation units 19 ₁, . . . , 19 _(N).

The fourth vector generation units 19 ₁, . . . , 19 _(N) each use the share [f′] to generate a share [s] of a vector s, each element of which is a sum of elements of the vector f′ up to an element corresponding to that element, the elements including the element corresponding to that element, and a share [s′] of a vector s′, each element of which is a sum of elements of a bit-inverted vector up to an element corresponding to that element, the elements including the element corresponding to that element, where the bit-inverted vector is a vector generated by bit inversion of each element of the vector f′ (step S9).

The share [s] and the share [s′] are output to the fifth vector generation units 110 ₁, . . . , 110 _(N).

For example, the vector s=(0, 1, 1, 2, 2, 3, 4) and the vector s′=(1, 1, 2, 2, 3, 3, 3) are yielded when the vector f′=(0, 1, 0, 1, 0, 1, 1).

Step S10

The share [s] and the share [s′] are input to the fifth vector generation units 110 ₁, . . . , 110 _(N).

The fifth vector generation units 110 ₁, . . . , 110 _(N) each use the share [f′], the share [s], and the share [s′] to calculate a share [σ″] of a vector σ″=f′s+(1−f′)s′−1 (step S10).

The share [σ″] is output to the first inverse permutation application units 111 ₁, . . . , 111 _(N).

For example, σ″=(0, 0, 1, 1, 2, 2, 3) is yielded when the vector s=(0, 1, 1, 2, 2, 3, 4) and the vector s′=(1, 1, 2, 2, 3, 3, 3).

Step S11

The share [e′] and the share [σ] are input to the first inverse permutation application units 111 ₁, . . . , 111 _(N).

The first inverse permutation application units 111 ₁, . . . , 111 _(N) each use the share [e′] and the share [σ] to generate a share [e″] of a vector e″=σ⁻¹(e′) which is generated by application of an inverse permutation σ⁻¹ of the permutation σ to the vector e′ (step S11).

The share [e″] is output to the first vector separation units 112 ₁, . . . , 112 _(N).

For example, the vector e″=(0, 1, 0, 0, 0, 1, 1) is yielded when the vector e′=(0, 0, 1, 0, 0, 1, 1) holds and the permutation σ is the permutation of the Formula (1) above.

Step S12

The share [e″] is input to the first vector separation units 112 _(k), . . . , 112 _(N).

The first vector separation units 112 _(k), . . . , 112 _(N) each use the share [e″] to generate a share [g₀] of a vector g₀ which is formed from the first m₀ elements of the vector e″ and a share [g₁] of a vector g₁ which is formed from the remaining m₁ elements of the vector e″ (step S12).

The share [g₁] is output.

For example, the vector g₀=(0, 1, 0) and the vector g₀=(0, 0, 1, 1) are yielded when the vector e″=(0, 1, 0, 0, 0, 1, 1).

Step S13

The share [σ] and the share [σ′] are input to the second inverse permutation application units 113 ₁, . . . , 113 _(N).

The second inverse permutation application units 113 ₁, . . . , 113 _(N) each use the share [σ″], the share [σ], and the share [σ] to generate a share [σ′″⁻¹] of a vector σ′″⁻¹=σ⁻¹(σ′⁻¹(σ″)) which is generated by application of an inverse permutation σ′⁻¹ of the permutation σ′ and the inverse permutation σ⁻¹ of the permutation σ to the vector x (step S13).

The share [σ′″⁻¹] is output to the second vector separation units 114 ₁, . . . , 114 _(N).

For example, σ′″⁻¹=(0, 2, 1, 0, 1, 2, 3) is yielded when the permutation σ is the permutation of the Formula (1) above and the permutation σ′ is the permutation of the Formula (2) above.

Step S14

The share [σ′″⁻¹] is input to the second vector separation units 114 ₁, . . . , 114 _(N).

The second vector separation units 114 ₁, . . . , 114 _(N) each use the share [σ′″⁻¹] to generate a share [σ₀ ⁻¹] of a vector σ₀ ⁻¹ which is formed from the first m₀ elements of the vector σ′″⁻¹ and a share [σ₁ ⁻¹] of a vector σ₁ ⁻¹ which is formed from the remaining m₁ elements of the vector σ′″⁻¹ (step S14).

The share [σ₁ ⁻¹] is output.

For example, the vector σ₀ ⁻¹=(0, 2, 1) and the vector σ₁ ⁻¹=(0, 1, 2, 3) are yielded when σ′″⁻¹=(0, 2, 1, 0, 1, 2, 3).

Step S15

The share [σ₁ ⁻¹], a share [π₀] of a permutation π₀, and a share [π₁] of a permutation π₁ are input to the third permutation application units 115 ₁, . . . , 115 _(N).

The third permutation application units 115 ₁, . . . , 115 _(N) each use the share [σ₀ ⁻¹], the share [σ₁ ⁻¹], the share [π₀] of the permutation π₀, and the share [π₁] of the permutation π₁ to generate a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to the vector σ₀ ⁻¹ and a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to the vector σ₁ ⁻¹, and release π₀(σ₀ ⁻¹) and π₁(σ₁ ⁻¹) (step S15).

The permutations π₀ and π₁ are predetermined permutations, which may be random permutations, for example. The permutations π₀ and π₁ may be predefined permutations or may be generated when the processing at step S15 is performed. The permutations π₀ and π₁ and their shares [π₀] and [π₁] can be generated by the approach described in Section 4.1 of Reference Literature 1, for example. It is assumed that the secure computing apparatus 1 _(n) (1≤n≤N) has information on the permutations π₀ and π₁ and their shares [π₀] and [π₁] and is capable of calculation using the permutations π₀ and π₁ and their shares [π₀] and [π₁].

For example, assume that the vector σ₀ ⁻¹=(0, 2, 1) and the vector σ₁ ⁻¹=(0, 1, 2, 3) hold, π₀ is the permutation represented by Formula (3) below, and π₁ is the permutation represented by Formula (4) below.

$\begin{matrix} {\pi_{0} = \begin{pmatrix} 1 & 2 & 3 \\ 3 & 1 & 2 \end{pmatrix}} & (3) \\ {\pi_{1} = \begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 1 & 3 \end{pmatrix}} & (4) \end{matrix}$

In this case, the vector π₀(σ₀ ⁻¹)=(2, 1, 0) and the vector π₁(σ₁ ⁻¹)=(2, 0, 3, 1) are yielded.

Step S16

The share [k₀] of the vector k₀, the share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and the share [v₁] of the vector v₁ are input to the fourth permutation application units 116 ₁, . . . , 116 _(N).

The fourth permutation application units 116 ₁, . . . , 116 _(N) each use the share [k₀] of the vector k₀, the share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and the share [v₁] of the vector v₁ to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁′] of a vector k₁′=(90 ₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁′] of a vector v₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)) (step S16).

The share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] are output to the first joined table generation units 117 ₁, . . . , 117 _(N).

For example, the vector k₀′=(1, 3, 2), the vector v₀′=(5, 1, 10), a vector k₁″=(1, 3, 4, 5), and a vector v₁″=(2, 4, 9, 8) are yielded in a case where the vector k₀=(1, 2, 3), the vector v₀=(5, 10, 1), the vector k₁=(1, 3, 4, 5), and the vector v₁′=(2, 4, 9, 8) hold, the permutation π₀ is the permutation represented by the Formula (3) above, and the permutation π₁ is the permutation represented by the Formula (4) above.

Step S17

The share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] are input to the first joined table generation units 117 ₁, . . . , 117 _(N).

The first joined table generation units 117 ₁, . . . , 117 _(N) each use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a vector generated by extracting the first c elements of the vector k₀′, a vector generated by extracting the first c elements of the vector v₀′, a vector generated by extracting the first c elements of the vector k₁′, and a vector generated by extracting the first c elements of the vector v₁′, where c is the number of 0 elements in the vector g₀ or the vector g₁ (step S17).

For example, the joined table will be the table shown below when the vector g₀=(0, 1, 0), the vector k₀′=(1, 3, 2), the vector v₀′=(5, 1, 10), the vector k₁″=(1, 3, 4, 5), and the vector v₁″=(2, 4, 9, 8).

k₀′ v₀′ k₁′ v₁′ (A) 1 5 1 2 3 1 3 4

The joined table (A) above is a table generated by left outer join of the first table which has three records and consists of the vector of keys, k₀=(1, 2, 3), and the vector of attribute values of one attribute, v₀=(5, 10, 1), and the second table which consists of the vector of keys, k₁=(1, 3, 4, 5), and the vector of attribute values of one attribute, v₁=(2, 4, 9, 8).

In this manner, use of inverse permutation enables two tables to be joined while maintaining confidentiality in a case with no key overlap more rapidly than the technique of Non-patent Literature 1.

Secure Joining System for Performing Left Outer Join

Referring to FIG. 6, an exemplary configuration of a secure joining system according to an embodiment is described. This secure joining system and method performs so-called left outer join. That is, this secure joining system joins records that are common to the first table and the second table with records that exist only in the first table while maintaining confidentiality.

The secure joining system for performing left outer join is similar to the secure joining system for performing inner join except that it includes a filtering unit 118 _(n), a fifth permutation application unit 119 _(n), and a second joined table generation unit 120 _(n) instead of including the fourth permutation application unit 116 _(n) and the first joined table generation unit 117 _(n).

The secure joining method for performing left outer join is similar to the secure joining method for performing inner join except that it performs the processing at steps S18 and S20 instead of performing the processing at step S16 and step S17.

In the following, differences from the secure joining system and method for performing inner join are described. The same portions as those of the secure joining system and method for performing inner join are not described again.

As shown in FIG. 6, the secure computing apparatus 1 _(n) of the secure joining system includes the vector joining unit 11 _(n), the first vector generation unit 12 _(n), the first permutation calculation unit 13 _(n), the first permutation application unit 14 _(n), the second vector generation unit 15 _(n), the third vector generation unit 16 _(n), the second permutation calculation unit 17 _(n), the second permutation application unit 18 _(n), the fourth vector generation unit 19 _(n), the fifth vector generation unit 110 _(n), the first inverse permutation application unit 111 _(n), the first vector separation unit 112 _(n), the second inverse permutation application unit 113 _(n) and the second vector separation unit 114 _(n), the third permutation application unit 115 _(n), the fourth permutation application unit 116 _(n), the first joined table generation unit 117 _(n), the filtering unit 118 _(n), the fifth permutation application unit 119 _(n), and the second joined table generation unit 120 _(n), for example.

First, processing at <step S1> to <step S15> is performed. As the processing at <step S1>to <step S15> is similar to the processing at <step S1> to <step S15> described in Section [Secure joining system and method for performing inner join], overlapping description is not repeated here.

Then, the processing at steps S18 to S20 described below is performed.

Step S18

The share [g₁], the share [k₁] of the vector k₁, and the share [v₁] of the vector v₁ are input to the filtering units 118 ₁, . . . , 118 _(N).

The filtering units 118 ₁, . . . , 118 _(N) each use the share [g₁], the share [k₁] of the vector k₁, and the share [v₁] of the vector v₁ to generate a modified second table in which if g_(1,i)=1, the ith element of the key of the second table is set to a predefined value u_(1,k) indicating null and the ith element of the attribute of the second table is set to a predefined value u_(1,v) indicating null, where g_(1,i) is the ith element of the vector g₁ (step S18). Let k₁′ be the vector of the key of the modified second table, and let v₁′ be the vector of the attribute value of the modified second table.

The modified second table is output to the fifth permutation application units 119 ₁, . . . , 119 _(N).

For example, the modified second table will be the table shown below when the second table consists of the vector of keys, k₁=(1, 3, 4, 5), and the vector of attribute values of one attribute, v₁=(2, 4, 9, 8), and the vector g₁=(0, 0, 1, 1) holds.

k₁′ v₁′ (B) 1 2 3 4 null null null null

Step S19

The share [k₀] of the vector k₀, the share [v₀] of the vector v₀, the share [k₁′] of k₁′, which is the vector of the key of the modified second table, the share [v₁′] of v₁′, which is the vector of the attribute value of the modified second table, the share [π₀] of the permutation π₀, the share [π₁] of the permutation π₁, the share [π₀(σ₀ ⁻¹)], and the share [π₁(σ₁ ⁻¹)] are input to the fifth permutation application units 119 ₁, . . . , 119 _(N).

The fifth permutation application units 119 ₁, . . . , 119 _(N) each use the share [k₀] of the vector k₀, the share [v₀] of the vector v₀, the share [k₁′] of k₁′, which is the vector of the key of the modified second table, the share [v₁′] of v₁′, which is the vector of the attribute value of the modified second table, the share [π₀] of the permutation π₀, the share [π₁] of the permutation π₁, the share [π₀(σ₀ ⁻¹)], and the share [π₁(σ₁ ⁻¹)] to calculate the share [k₀′] of the vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), the share [v₀′] of the vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁″] of a vector k₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁″] of a vector v₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)) (step S18).

The share [k₀′], the share [v₀′], the share [k₁″], and the share [v₁″] are output to the second joined table generation units 120 ₁, . . . , 120 _(N).

For example, the vector k₀′=(1, 3, 2), the vector v₀′=(5, 1, 10), the vector k₁″=(1, 3, u_(1,k), u_(1,k)), and the vector v₁″=(2, 4, u_(1,v), u_(1,v)) are yielded in a case where the vector k₀=(1, 2, 3), the vector v₀=(5, 10, 1), the vector k₁′=(1, 3, u_(1,k), u_(1,k)), and the vector v₁′=(2, 4, u_(1,v), u_(1,v)) hold, the permutation π₀ is the permutation represented by the Formula (3) above, and the permutation π₁ is the permutation represented by the Formula (4) above.

Step S20

The share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁″] are input to the second joined table generation units 120 ₁, . . . , 120 _(N).

The second joined table generation units 120 ₁, . . . , 120 _(N) each use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁″] to generate, when m₀<m₁, a joined table which joins the vector k₀′, the vector v₀′, a vector generated by extracting the first m₀ elements of the vector k₁″, and a vector generated by extracting the first m₀ elements of the vector v₁″, and to generate, when m₀>m₁, a joined table which joins a vector generated by adding m₀-m₁ elements being a predefined value u_(k) indicating null to the vector k₁″, a vector generated by adding m₀-m₁ elements being a predefined value u_(v) indicating null to the vector v₁″, the vector k₀′, and the vector v₀′ (step S20).

For example, the joined table will be the table shown below when the vector k₀′=(1, 3, 2), the vector v₀′=(5, 1, 10), the vector k₁″=(1, 3, u_(1,k), u_(1,k)), and the vector v₁″=(2, 4, u_(1,v), u_(1,v)).

k₀′ v₀′ k₁″ v₁″ (C) 1 5 1 2 3 1 3 4 2 10 u_(k) u_(v)

The joined table (C) above is a table generated by left outer join of the first table which has three records and consists of the vector of keys, k₀=(1, 2, 3), and the vector of attribute values of one attribute, v₀=(5, 10, 1), and the second table which consists of the vector of keys, k₁=(1, 3, 4, 5), and the vector of attribute values of one attribute, v₁=(2, 4, 9, 8).

As another example, the joined table will be the table shown below when the vector k₀′=(1, 3, 4, 5), the vector v₀′=(2, 4, 9, 8), the vector k₁″=(1, 3), and the vector v₁″=(5, 1).

k₀′ v₀′ k₁″ v₁″ (D) 1 2 1 5 3 4 3 1 4 9 u_(k) u_(v) 5 8 u_(k) u_(v)

With this embodiment, left outer join of the first table and the second table can be performed while maintaining confidentiality.

In this manner, use of inverse permutation enables two tables to be joined while maintaining confidentiality in a case with no key overlap more rapidly than the technique of Non-patent Literature 1.

Secure Joining System and Method for Performing Full Outer Join

Referring to FIG. 7, an exemplary configuration of a secure joining system according to an embodiment is described. This secure joining system and method performs so-called full outer join. In other words, this secure joining system joins records that are common to the first table and the second table, records that exist only in the first table, and records that exist only in the second table while maintaining confidentiality.

The secure joining system for performing full outer join is similar to the secure joining system for performing inner join except that it includes a third joined table generation unit 121 _(n) instead of including the first joined table generation unit 117 _(n).

The secure joining method for performing full outer join is similar to the secure joining method for performing inner join except that it performs the processing at step S21 instead of performing the processing at step S17.

In the following, differences from the secure joining system and method for performing inner join are described. The same portions as those of the secure joining system and method for performing inner join are not described again.

As shown in FIG. 7, the secure computing apparatus 1 _(n) of the secure joining system includes the vector joining unit 11 _(n), the first vector generation unit 12 _(n), the first permutation calculation unit 13 _(n), the first permutation application unit 14 _(n), the second vector generation unit 15 _(n), the third vector generation unit 16 _(n), the second permutation calculation unit 17 _(n), the second permutation application unit 18 _(n), the fourth vector generation unit 19 _(n), the fifth vector generation unit 110 _(n), the first inverse permutation application unit 111 _(n), the first vector separation unit 112 _(n), the second inverse permutation application unit 113 _(n) and the second vector separation unit 114 _(n), the third permutation application unit 115 _(n), the fourth permutation application unit 116 _(n), and the third joined table generation unit 121 _(n), for example.

First, processing at <step S1> to <step S16> is performed. As the processing at <step S1> to <step S16> is similar to the processing at <step S1> to <step S16> described in Section [Secure joining system and method for performing inner join], overlapping description is not repeated here.

Then, the processing at step S21 described below is performed.

Step S21

The share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] are input to the third joined table generation units 121 ₁, . . . , 121 _(N).

The third joined table generation units 121 ₁, . . . , 121 _(N) each use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a table (1) which joins a vector generated by extracting the first c elements of the vector k₀′, a vector generated by extracting the first c elements of the vector v₀′, a vector generated by extracting the first c elements of the vector k₁′, and a vector generated by extracting the first c elements of the vector v₁′, a table (2) which joins a vector generated by extracting the remaining m₀-c elements of the vector k₀′, a vector generated by extracting the remaining m₀-c elements of the vector v₀′, and a vector having a value corresponding to the attribute value of the second table set to a predefined value u′_(1,v) indicating null, and a table (3) which joins a vector generated by extracting the remaining m₀-c elements of the vector v₀′, a vector generated by extracting the remaining m₁-c elements of the vector v₁′, and a vector having a value corresponding to the attribute value of the first table set to a predefined value u′_(0,v) indicating null, where c is the number of 0 elements in the vector g₀ or the vector g₁ (step S21).

For example, the joined table will be the table shown below when the vector g₀=(0, 1, 0), the vector k₀′=(1, 3, 2), the vector v₀′=(5, 1, 10), the vector k₁″=(1, 3, 4, 5), and the vector v₁″=(2, 4, 9, 8).

In the table below, the table from the first row to the second row corresponds to table (1), the table in the third row corresponds to table (2), and the table from the fourth row to the fifth row corresponds to table (3).

k₀′ v₀′ k₁″ v₁″ (E) 1 5 1 2 3 1 3 4 2 10  u′_(1, u) u′_(1, v) u′_(0, u) u′_(0, v) 4 9 u′_(0, u) u′_(0, v) 5 8

The joined table (E) above is a table generated by full outer join of the first table which has three records and consists of the vector of keys, k_(o)=(1, 2, 3), and the vector of attribute values of one attribute, v₀=(5, 10, 1), and the second table which consists of the vector of keys, k₁=(1, 3, 4, 5), and the vector of attribute values of one attribute, v₁=(2, 4, 9, 8).

In this manner, use of inverse permutation enables two tables to be joined while maintaining confidentiality in a case with no key overlap more rapidly than the technique of Non-patent Literature 1.

Secure Joining Information Generation System

In the secure computing apparatus 1 _(n) of the secure joining system described above, the portion including the vector joining unit 11 _(n), the first vector generation unit 12 _(n), the first permutation calculation unit 13 _(n), the first permutation application unit 14 _(n), the second vector generation unit 15 _(n), the third vector generation unit 16 _(n), the second permutation calculation unit 17 _(n), the second permutation application unit 18 _(n), the fourth vector generation unit 19 _(n), the fifth vector generation unit 110 _(n), the first inverse permutation application unit 111 _(n), the first vector separation unit 112 _(n), the second inverse permutation application unit 113 _(n) and the second vector separation unit 114 _(n), and the third permutation application unit 115 _(n) represents the secure joining information generation system.

In other words, the secure computing apparatus 1 _(n) of the secure joining information generation system includes the vector joining unit 11 _(n), the first vector generation unit 12 _(n), the first permutation calculation unit 13 _(n), the first permutation application unit 14 _(n), the second vector generation unit 15 _(n), the third vector generation unit 16 _(n), the second permutation calculation unit 17 _(n), the second permutation application unit 18 _(n), the fourth vector generation unit 19 _(n), the fifth vector generation unit 110 _(n), the first inverse permutation application unit 111 _(n), the first vector separation unit 112 _(n), the second inverse permutation application unit 113 _(n) and the second vector separation unit 114 _(n), and the third permutation application unit 115, as shown by broken lines in FIGS. 2, 6, and 7.

The secure joining information generation method is implemented by the execution of steps S1 to S15 by the components of the secure computing apparatus 1 _(n) of the secure joining information generation system. As the processing at step S1 to step S15 is similar to those described above, overlapping description is not repeated.

Multiple secure joining information generation units 1 ₁, . . . , 1 _(N) of the secure joining information generation system can be said to use the share [k₀] of the vector k₀, the share [k₁] of the vector k₁, the share [π₀] of the permutation π₀, and the share [π₁] of the permutation π₁ to generate: the share [π₀(σ₀ ⁻¹)] of the vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to the inverse permutation σ₀ ⁻¹ of the permutation σ₀, where permutation of each vector of the first table with the permutation σ₀ causes records for keys common to the first table and the second table to move to the head side; the share [π₁(σ₁ ⁻¹)] of the vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to the inverse permutation σ₁ ⁻¹ of the permutation σ₁, where permutation of each vector of the second table with the permutation σ₁ causes records for keys common to the first table and the second table to move to the head side; the share [g₀] of the vector g₀ which is formed from a value g_(0,i) indicating whether the ith record of the first table is a record for a key that is common to the first table and the second table; and the share [g₁] of the vector g₁ which is formed from a value g_(1,i) indicating whether the ith record of the second table is a record for a key that is common to the first table and the second table.

Modifications

While the embodiments of the present invention have been described, specific configurations are not limited to these embodiments, but design modifications and the like within a range not departing from the spirit of the invention are encompassed in the scope of the invention, of course.

For example, the attribute of a key may be a composite key of x attributes, where x is a positive integer greater than or equal to 2. In this case, the processing at step S1 may be performed in the following manner, for example.

The keys of the first table are assumed to be k_(0,0), . . . , k_(0,x−1). The keys of the second table are assumed to be k_(1,0), . . . , k_(1,x−1).

In this case, the processing at step S1 joins k_(0,i) and k_(1,i) to obtain k′_(i) for each i (where i=0, . . . , x−1). Then, each k′_(i) is turned into a bit representation by bit decomposition and joined horizontally. For example, when k′₀=(1, 2, 3, 1, 3, 0, 1)^(T) and k′₁=(0, 0, 0, 0, 0, 1, 1)^(T), bit decomposition of k′₀ results in (k′₀)₀=(1, 0, 1, 1, 1, 0, 1)^(T) and (k′₀)₁=(0, 1, 1, 0, 1, 0, 0)^(T).

Here, since k′₀ assumes a value from 1 to 3, each element of k′₀ can be represented in 2 bits. (k′₀)₀ is the lower bit of k′₀ upon bit decomposition, and (k′₀)₁ is the upper bit of k′₀ upon bit decomposition. Since k′₁ is inherently a 1-bit number in this example, it does not require decomposition and k′₁=(k′₁)₀ is assumed. Horizontal joining of (k′₀)₀, (k′₀)₁, and (k′₁)₀ gives:

$\begin{pmatrix} 1. & 0. & 1. & 1. & 1. & 0. & 1 \\ 0. & 1. & 1. & 0. & 1. & 0. & 0 \\ 0. & 0. & 0. & 0. & 0. & 1. & 1 \end{pmatrix}^{T}.$

Regarding such an arrangement as a matrix and regarding each row of this matrix as a bit representation of the keys of one record, a vector of bit representations of keys, (1, 2, 3, 1, 3, 4, 5), is obtained. This vector can be k′ which is used at step S2 and after. In this manner, a case with a composite key can also be addressed.

For a composite key, overlap of keys refers to whether keys overlap in terms of combination of the values of the all key attributes and it is assumed that mere overlapping of the values of individual attributes is not regarded as an overlap. For example, a combination of (1, 0) and (1, 1) is not an overlap.

The various processes described in the embodiments may be executed in parallel or separately depending on the processing ability of an apparatus executing the process or on any necessity, rather than being executed in time series in accordance with the described order.

Program and Recording Medium

When various types of processing functions in the apparatuses described in the above embodiments are implemented on a computer, the contents of processing function to be contained in each apparatus is written by a program. With this program executed on the computer, various types of processing functions in the above-described apparatuses are implemented on the computer.

This program in which the contents of processing are written can be recorded in a computer-readable recording medium. The computer-readable recording medium may be any medium such as a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory.

Distribution of this program is implemented by sales, transfer, rental, and other transactions of a portable recording medium such as a DVD and a CD-ROM on which the program is recorded, for example.

Furthermore, this program may be stored in a storage unit of a server computer and transferred from the server computer to other computers via a network so as to be distributed.

A computer which executes such program first stores the program recorded in a portable recording medium or transferred from a server computer once in a storage unit thereof, for example. When the processing is performed, the computer reads out the program stored in the storage unit thereof and performs processing in accordance with the program thus read out. As another execution form of this program, the computer may directly read out the program from a portable recording medium and perform processing in accordance with the program. Furthermore, each time the program is transferred to the computer from the server computer, the computer may sequentially perform processing in accordance with the received program. Alternatively, a configuration may be adopted in which the transfer of a program to the computer from the server computer is not performed and the above-described processing is executed by so-called application service provider (ASP)-type service by which the processing functions are implemented only by an instruction for execution thereof and result acquisition. It should be noted that a program in this form includes information which is provided for processing performed by electronic calculation equipment and which is equivalent to a program (such as data which is not a direct instruction to the computer but has a property specifying the processing performed by the computer).

In this form, the present apparatus is configured with a predetermined program executed on a computer. However, the present apparatus may be configured with at least part of these processing contents realized in a hardware manner. 

1. A secure joining information generation system comprising: a plurality of secure computing apparatuses, wherein F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively, and the plurality of secure computing apparatuses include processing circuitry configured to use a share [k₀] of the vector k₀ and a share [k₁] of the vector k₁ to generate a share [k] of a vector k ∈ [F_(k)]^(m0+m1) which is generated by joining the vector k₀ and the vector k₁, generate a share [f] of a vector f which is generated by joining m₀ 0's and m₁ 1's; use the share [k] to generate a share [σ] of a permutation σ for stable sorting of the vector k, use the share [k], the share [σ], and the share [f] to generate a share [σ(k)] of a vector σ(k) which is generated by application of the permutation σ to the vector k and a share [σ(f)] of a vector σ(f) which is generated by application of the permutation σ to the vector f, use the share [σ(k)] to generate a share [e] of a vector e which has 1 when a certain element of the vector σ(k) and an element following that element are the same and has 0 when they are different as an element corresponding to that element, use the share [e] to generate a share [e′] of a vector e′, which is generated by bit inversion of each element of a vector which has 1 when one of a certain element of the vector e and an element preceding that element is 1 and has 0 otherwise as an element corresponding to that element, use the share [e′] to generate a share [σ′] of a permutation σ′ for stable sorting of the vector e′; use the share [σ(f)] and the share [σ′] to generate a share [f′] of a vector f′=σ′(σ(f)) which is generated by application of the permutation σ′ to the vector σ(f), use the share [f′] to generate a share [s] of a vector s, each element of which is a sum of elements of the vector f′ up to an element corresponding to that element, the elements including the element corresponding to that element, and a share [s′] of a vector s′, each element of which is a sum of elements of a bit-inverted vector up to an element corresponding to that element, the elements including the element corresponding to that element, where the bit-inverted vector is a vector generated by bit inversion of each element of the vector f′, use the share [f′], the share [s], and the share [s′] to calculate a share [σ″] of a vector σ″=f′s+(1−f′)s′−1, use the share [e′] and the share [σ] to generate a share [e″] of a vector e″=σ⁻¹(e′) which is generated by application of an inverse permutation σ⁻¹ of the permutation σ to the vector e′, use the share [e″] to generate a share [g₀] of a vector g₀ which is formed from first m₀ elements of the vector e″ and a share [g₁] of a vector g₁ which is formed from remaining m₁ elements of the vector e″, use the share [σ″], the share [σ], and the share [σ′] to generate a share [σ′″⁻¹] of a vector σ′″⁻¹=σ⁻¹(σ′⁻¹(σ″)) which is generated by application of an inverse permutation σ′⁻¹ of the permutation σ′ and the inverse permutation σ⁻¹ of the permutation σ to the vector x, use the share [σ′″⁻¹] to generate a share [σ₀ ⁻¹] of a vector σ₀ ⁻¹ which is formed from first m₀ elements of the vector σ′″⁻¹ and a share [σ₁ ⁻¹] of a vector σ₁ ⁻¹ which is formed from remaining m₁ elements of the vector σ′″⁻¹, and use the share [σ₀ ⁻¹], the share [σ₁ ⁻¹], a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to the vector σ₀ ⁻¹ and a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to the vector σ₁ ⁻¹, and release the π₀(σ₀ ⁻¹) and the π₁(σ₁ ⁻¹).
 2. A secure joining system comprising: the plurality of secure computing apparatuses of the secure joining information generation system according to claim 1, wherein the plurality of secure computing apparatuses further include processing circuitry configured to use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and a share [v₁] of the vector v₁ to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁′] of a vector k₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁′] of a vector v₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′), and use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a vector generated by extracting first c elements of the vector k₀′, a vector generated by extracting first c elements of the vector v₀′, a vector generated by extracting first c elements of the vector k₁′, and a vector generated by extracting first c elements of the vector v₁′, where c is the number of 0 elements in the vector g₀ or the vector g₁.
 3. A secure joining system comprising: a plurality of secure computing apparatuses, wherein F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively, and the plurality of secure computing apparatuses include processing circuitry configured to use a share [k₀] of the vector k₀, a share [k₁] of the vector k₁, a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate: a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to an inverse permutation σ₀ ⁻¹ of a permutation σ₀, where permutation of each vector of the first table with the permutation σ₀ causes records for keys common to the first table and the second table to move to a head side; a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻) which is generated by application of the permutation π₁ to an inverse permutation σ₁ ⁻¹ of a permutation σ₁, where permutation of each vector of the second table with the permutation σ₁ causes records for keys common to the first table and the second table to move to the head side; a share [g₀] of a vector g₀ which is formed from a value g_(0,i) indicating whether the ith record of the first table is a record for a key that is common to the first table and the second table; and a share [g₁] of a vector g₁ which is formed from a value g_(1,i) indicating whether the ith record of the second table is a record for a key that is common to the first table and the second table, use the share [g₁], the share [k₁] of the vector k₁, and the share [v₁] of the vector v₁ to generate a modified second table in which if g_(1,i)=1, the ith element of the key of the second table is set to a predefined value u_(1,k) indicating null and the ith element of the attribute of the second table is set to a predefined value u_(1,v) indicating null, where g_(1,i) is the ith element of the vector g₁, use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, a share [k₁′] of k₁′, which is a vector of the key of the modified second table, a share [v₁′] of v₁′, which is a vector of the attribute value of the modified second table, the share [π₀] of the permutation π₀, the share [π₁] of the permutation π₁, the share [π₀(σ₀ ⁻¹)], and the share [π₁(σ₁ ⁻¹)] to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁″] of a vector k₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁″] of a vector v₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)), and use the share [k₀′], the share [v₀′], the share [k₁″], and the share [v₁″] to generate, when m₀<m₁, a joined table which joins the vector k₀′, the vector v₀′, a vector generated by extracting first m₀ elements of the vector k₁″, and a vector generated by extracting first m₀ elements of the vector v₁″, and to generate, when m₀>m₁, a joined table which joins the vector k₀′, the vector v₀′, a vector generated by adding m₀-m₁ elements being a predefined value u_(k) indicating null to the vector k₁″, and a vector generated by adding m₀-m₁ elements being a predefined value u_(v) indicating null to the vector v₁″.
 4. A secure joining system comprising: a plurality of secure computing apparatuses, wherein F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively, and the plurality of secure computing apparatuses include processing circuitry configured to use a share [k₀] of the vector k₀, a share [k₁] of the vector k₁, a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate: a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to an inverse permutation σ₀ ⁻¹ of a permutation σ₀, where permutation of each vector of the first table with the permutation σ₀ causes records for keys common to the first table and the second table to move to a head side; a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to an inverse permutation σ₁ ⁻¹ of a permutation σ₁, where permutation of each vector of the second table with the permutation σ₁ causes records for keys common to the first table and the second table to move to the head side; a share [g₀] of a vector g₀ which is formed from a value g_(0,i) indicating whether the ith record of the first table is a record for a key that is common to the first table and the second table; and a share [g₁] of a vector g₁ which is formed from a value g_(1,i) indicating whether the ith record of the second table is a record for a key that is common to the first table and the second table, use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and a share [v₁] of the vector v₁ to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁′] of a vector k₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′), and a share [v₁′] of a vector v₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)), and use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a table (1) which joins a vector generated by extracting first c elements of the vector k₀′, a vector generated by extracting first c elements of the vector v₀′, a vector generated by extracting first c elements of the vector k₁′, and a vector generated by extracting first c elements of the vector v₁′, a table (2) which joins a vector generated by extracting remaining m₀-c elements of the vector k₀′, a vector generated by extracting remaining m₀-c elements of the vector v₀′, and a vector having a value corresponding to the attribute value of the second table set to a predefined value u′_(1,v) indicating null, and a table (3) which joins a vector generated by extracting remaining m₀-c elements of the vector v₀′, a vector generated by extracting remaining m₁-c elements of the vector v₁′, and a vector having a value corresponding to the attribute value of the first table set to a predefined value u′_(0,v) indicating null where c is the number of 0 elements in the vector g₀ or the vector g₁.
 5. The secure joining system according to claim 3 or 4, wherein the plurality of secure computing apparatuses further include processing circuitry configured to use a share [k₀] of the vector k₀ and a share [k₁] of the vector k₁ to generate a share [k] of a vector k ∈ [F_(k)]^(m0+m1) which is generated by joining the vector k₀ and the vector k₁, generate a share [f] of a vector f which is generated by joining m₀ 0's and m₁ 1's, use the share [k] to generate a share [σ] of a permutation σ for stable sorting of the vector k, use the share [k], the share [σ], and the share [f] to generate a share [σ(k)] of a vector σ(k) which is generated by application of the permutation σ to the vector k and a share [σ(f)] of a vector σ(f) which is generated by application of the permutation σ to the vector f, use the share [σ(k)] to generate a share [e] of a vector e which has 1 when a certain element of the vector σ(k) and an element following that element are the same and has 0 when they are different as an element corresponding to that element, use the share [e] to generate a share [e′] of a vector e′, which is generated by bit inversion of each element of a vector which has 1 when one of a certain element of the vector e and an element preceding that element is 1 and has 0 otherwise as an element corresponding to that element, use the share [e′] to generate a share [σ′] of a permutation σ′ for stable sorting of the vector e′, use the share [σ(f)] and the share [σ′] to generate a share [f′] of a vector f′=σ′(σ(f)) which is generated by application of the permutation σ′ to the vector σ(f), use the share [f′] to generate a share [s] of a vector s, each element of which is a sum of elements of the vector f′ up to an element corresponding to that element, the elements including the element corresponding to that element, and a share [s′] of a vector s′, each element of which is a sum of elements of a bit-inverted vector up to an element corresponding to that element, the elements including the element corresponding to that element, where the bit-inverted vector is a vector generated by bit inversion of each element of the vector f′, use the share [f′], the share [s], and the share [s′] to calculate a share [σ″] of a vector σ″=f′s+(1−f′)s′−1, use the share [e′] and the share [σ] to generate a share [e″] of a vector e″=σ⁻¹(e′) which is generated by application of an inverse permutation σ⁻¹ of the permutation σ to the vector e′, use the share [e″] to generate a share [g₀] of a vector g₀ which is formed from first m₀ elements of the vector e″ and a share [g₁] of a vector g₁ which is formed from remaining m₁ elements of the vector e″, use the share [σ″], the share [σ], and the share [σ′] to generate a share [σ′″⁻¹] of a vector σ′″⁻¹=σ⁻¹(σ′⁻¹(σ″)) which is generated by application of an inverse permutation σ′⁻¹ of the permutation σ′ and the inverse permutation σ⁻¹ of the permutation σ to the vector x, use the share [σ′″⁻¹] to generate a share [σ₀ ⁻¹] of a vector σ₀ ⁻¹ which is formed from first m₀ elements of the vector σ′″⁻¹ and a share [σ₁ ⁻¹] of a vector σ₁ ⁻¹ which is formed from remaining m₁ elements of the vector σ′″⁻¹, and use the share [σ₀ ⁻¹], the share [σ₁ ⁻¹], a share [π] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to the vector σ₀ ⁻¹ and a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to the vector σ₁ ⁻¹, and release the π₀(σ₀ ⁻¹) and the π₁(σ₁ ⁻¹).
 6. A secure computing apparatus of the secure joining information generation system according to claim 1 or the secure joining system according to claim 2 or
 3. 7. A secure joining information generation method, where F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively, the secure joining information generation method comprising: a vector joining step in which a plurality of vector joining units use a share [k₀] of the vector k₀ and a share [k₁] of the vector k₁ to generate a share [k] of a vector k ∈ [F_(k)]^(m0+m1) which is generated by joining the vector k₀ and the vector k₁; a first vector generation step in which a plurality of first vector generation units generate a share [f] of a vector f which is generated by joining m₀ 0's and m₁ 1's; a first permutation calculation step in which a plurality of first permutation calculation units use the share [k] to generate a share [σ] of a permutation σ for stable sorting of the vector k; a first permutation application step in which a plurality of first permutation application units use the share [k], the share [σ], and the share [f] to generate a share [σ(k)] of a vector σ(k) which is generated by application of the permutation σ to the vector k and a share [σ(f)] of a vector σ(f) which is generated by application of the permutation σ to the vector f; a second vector generation step in which a plurality of second vector generation units use the share [σ(k)] to generate a share [e] of a vector e which has 1 when a certain element of the vector σ(k) and an element following that element are the same and has 0 when they are different as an element corresponding to that element; a third vector generation step in which a plurality of third vector generation units use the share [e] to generate a share [e′] of a vector e′, which is generated by bit inversion of each element of a vector which has 1 when one of a certain element of the vector e and an element preceding that element is 1 and has 0 otherwise as an element corresponding to that element; a second permutation calculation step in which a plurality of second permutation calculation units use the share [e′] to generate a share [σ′] of a permutation σ′ for stable sorting of the vector e′; a second permutation application step in which a plurality of second permutation application units use the share [σ(f)] and the share [σ′] to generate a share [f′] of a vector f′=σ′(σ(f)) which is generated by application of the permutation σ′ to the vector σ(f); a fourth vector generation step in which a plurality of fourth vector generation units use the share [f′] to generate a share [s] of a vector s, each element of which is a sum of elements of the vector f′ up to an element corresponding to that element, the elements including the element corresponding to that element, and a share [s′] of a vector s′, each element of which is a sum of elements of a bit-inverted vector up to an element corresponding to that element, the elements including the element corresponding to that element, where the bit-inverted vector is a vector generated by bit inversion of each element of the vector f′; a fifth vector generation step in which a plurality of fifth vector generation units use the share [f′], the share [s], and the share [s′] to calculate a share [σ″] of a vector σ″=f′s+(1−f′)s′−1; a first inverse permutation application step in which a plurality of first inverse permutation application units use the share [e′] and the share [σ] to generate a share [e″] of a vector e″=σ⁻¹(e′) which is generated by application of an inverse permutation σ⁻¹ of the permutation σ to the vector e′; a first vector separation step in which a plurality of first vector separation units use the share [e″] to generate a share [g₀] of a vector g₀ which is formed from first m₀ elements of the vector e″ and a share [g₁] of a vector g₁ which is formed from remaining m₁ elements of the vector e″; a second inverse permutation application step in which a plurality of second inverse permutation application units use the share [σ″], the share [σ], and the share [σ′] to generate a share [σ′″⁻¹] of a vector σ′″⁻¹=σ⁻¹(σ′⁻¹(σ″)) which is generated by application of an inverse permutation σ′⁻¹ of the permutation σ′ and the inverse permutation σ⁻¹ of the permutation σ to the vector x; a second vector separation step in which a plurality of second vector separation units use the share [σ′″⁻¹] to generate a share [σ₀ ⁻¹] of a vector σ₀ ⁻¹ which is formed from first m₀ elements of the vector σ′″⁻¹ and a share [σ₁ ¹] of a vector σ₁ ⁻¹ which is formed from remaining m₁ elements of the vector σ′″⁻¹; and a third permutation application step in which a plurality of third permutation application units use the share [σ₀ ⁻¹], the share [σ₁ ⁻¹], a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to the vector σ₀ ⁻¹ and a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to the vector σ₁ ⁻¹, and release the π₀(σ₀ ⁻¹) and the π₁(σ₁ ⁻¹).
 8. A secure joining method comprising: the steps of the secure joining information generation system according to claim 7; a fourth permutation application step in which a plurality of fourth permutation application units use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and a share [v₁] of the vector v₁ to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁′] of a vector k₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁′] of a vector v₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)); and a first joined table generation step in which a plurality of first joined table generation units use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a vector generated by extracting first c elements of the vector k₀′, a vector generated by extracting first c elements of the vector v₀′, a vector generated by extracting first c elements of the vector k₁′, and a vector generated by extracting first c elements of the vector v₁′, where c is the number of 0 elements in the vector g₀ or the vector g₁.
 9. A secure joining method, where F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively, the secure joining method comprising: a secure joining information generation step in which a plurality of secure joining information generation units use a share [k₀] of the vector k₀, a share [k₁] of the vector k₁, a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate: a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to an inverse permutation σ₀ ⁻¹ of a permutation σ₀, where permutation of each vector of the first table with the permutation σ₀ causes records for keys common to the first table and the second table to move to a head side; a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to an inverse permutation σ₁ ⁻¹ of a permutation σ₁, where permutation of each vector of the second table with the permutation σ₁ causes records for keys common to the first table and the second table to move to the head side; a share [g₀] of a vector g₀ which is formed from a value g_(0,i) indicating whether the ith record of the first table is a record for a key that is common to the first table and the second table; and a share [g₁] of a vector g₁ which is formed from a value g_(1,i) indicating whether the ith record of the second table is a record for a key that is common to the first table and the second table; a filtering step in which a plurality of filtering units use the share [g₁], the share [k₁] of the vector k₁, and the share [v₁] of the vector v₁ to generate a modified second table in which if g_(1,i)=1, the ith element of the key of the second table is set to a predefined value u_(1,k) indicating null and the ith element of the attribute of the second table is set to a predefined value u_(1,v) indicating null, where g_(1,i) is the ith element of the vector g₁; a fifth permutation application step in which a plurality of fifth permutation application units use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, a share [k₁′] of k₁′, which is a vector of the key of the modified second table, a share [v₁′] of v₁′, which is a vector of the attribute value of the modified second table, the share [π₀] of the permutation π₀, the share [π₁] of the permutation π₁, the share [π₀(σ₀ ⁻¹)], and the share [π₁(σ₁ ⁻¹)] to calculate a share [k₀′] of a vector k₀′(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁″] of a vector k₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁″] of a vector v₁″=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)); and a second joined table generation step in which a plurality of second joined table generation units use the share [k₀′], the share [v₀′], the share [k₁″], and the share [v₁″] to generate, when m₀<m₁, a joined table which joins the vector k₀′, the vector v₀′, a vector generated by extracting first m₀ elements of the vector k₁″, and a vector generated by extracting first m₀ elements of the vector v₁″, and to generate, when m₀>m₁, a joined table which joins the vector k₀′, the vector v₀′, a vector generated by adding m₀-m₁ elements being a predefined value u_(k) indicating null to the vector k₁″, and a vector generated by adding m₀-m₁ elements being a predefined value u_(v) indicating null to the vector v₁″.
 10. A secure joining method, where F_(k) and F_(v) are arbitrary rings; [α] is a share generated by secret sharing of α, with α being an arbitrary vector or arbitrary permutation; m₀ and m₁ are integers greater than or equal to 1; k₀ ∈ F_(k) ^(m0) is a vector of a key of a first table; v₀ ∈ F_(v) ^(m0) is a vector of an attribute value of the first table; k₁ ∈ F_(k) ^(m1) is a vector of a key of a second table; v₁ ∈ F_(v) ^(m1) is a vector of an attribute value of the second table; and π₀ and π₁ are predetermined permutations with lengths of m₀ and m₁, respectively, the secure joining method comprising: a secure joining information generation step in which a plurality of secure joining information generation units use a share [k₀] of the vector k₀, a share [k₁] of the vector k₁, a share [π₀] of the permutation π₀, and a share [π₁] of the permutation π₁ to generate: a share [π₀(σ₀ ⁻¹)] of a vector π₀(σ₀ ⁻¹) which is generated by application of the permutation π₀ to an inverse permutation σ₀ ⁻¹ of a permutation σ₀, where permutation of each vector of the first table with the permutation σ₀ causes records for keys common to the first table and the second table to move to a head side; a share [π₁(σ₁ ⁻¹)] of a vector π₁(σ₁ ⁻¹) which is generated by application of the permutation π₁ to an inverse permutation σ₁ ⁻¹ of a permutation σ₁, where permutation of each vector of the second table with the permutation σ₁ causes records for keys common to the first table and the second table to move to the head side; a share [g₀] of a vector g₀ which is formed from a value g_(0,i) indicating whether the ith record of the first table is a record for a key that is common to the first table and the second table; and a share [g₁] of a vector g₁ which is formed from a value g_(1,i) indicating whether the ith record of the second table is a record for a key that is common to the first table and the second table; a fourth permutation application step in which a plurality of fourth permutation application units use the share [k₀] of the vector k₀, a share [v₀] of the vector v₀, the share [k₁] of the vector k₁, and a share [v₁] of the vector v₁ to calculate a share [k₀′] of a vector k₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(k₀)), a share [v₀′] of a vector v₀′=(π₀(σ₀ ⁻¹))⁻¹(π₀(v₀)), a share [k₁′] of a vector k₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(k₁′)), and a share [v₁′] of a vector v₁′=(π₁(σ₁ ⁻¹))⁻¹(π₁(v₁′)); and a third joined table generation step in which a plurality of third joined table generation units use the share [k₀′], the share [v₀′], the share [k₁′], and the share [v₁′] to generate a joined table which joins a table (1) which joins a vector generated by extracting first c elements of the vector k₀′, a vector generated by extracting first c elements of the vector v₀′, a vector generated by extracting first c elements of the vector k₁′, and a vector generated by extracting first c elements of the vector vu₁′, a table (2) which joins a vector generated by extracting remaining m₀-c elements of the vector k₀′, a vector generated by extracting remaining m₀-c elements of the vector v₀′, and a vector having a value corresponding to the attribute value of the second table set to a predefined value u′_(1,v) indicating null, and a table (3) which joins a vector generated by extracting remaining m₀-c elements of the vector v₀′, a vector generated by extracting remaining m₁-c elements of the vector v₁′, and a vector having a value corresponding to the attribute value of the first table set to a predefined value u′_(0,v) indicating null, where c is the number of 0 elements in the vector g₀ or the vector g₁.
 11. One or more non-transitory computer readable that store a program for causing one or more computers to perform the method according to any one of claims 7-10 